Skip to content

Fix syntax error in the bash script regarding LD_LIBRARY_PATH#1624

Open
fairyfar wants to merge 1 commit intoapache:mainfrom
fairyfar:main
Open

Fix syntax error in the bash script regarding LD_LIBRARY_PATH#1624
fairyfar wants to merge 1 commit intoapache:mainfrom
fairyfar:main

Conversation

@fairyfar
Copy link
Contributor

What does this PR do?

Fix syntax error in the bash script regarding LD_LIBRARY_PATH.
Some of bash scripts or commands missed the symbol '$' when referencing LD_LIBRARY_PATH‌.

In addition, the corresponding product manual also has the same careless omission. Such as (only a part of it):
https://cloudberry.apache.org/docs/deployment/quick-build
https://cloudberry.apache.org/docs/next/deployment/configure

Type of Change

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


@fairyfar fairyfar closed this Mar 16, 2026
Copy link
Member

@yjhjstz yjhjstz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tuhaihe
Copy link
Member

tuhaihe commented Mar 20, 2026

Hi @fairyfar thanks for your work! Could you share the bash/OS version or other related info? I want to reproduce it. Thanks!

@fairyfar
Copy link
Contributor Author

Hi @fairyfar thanks for your work! Could you share the bash/OS version or other related info? I want to reproduce it. Thanks!

[yz@localhost ~]$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
...

[yz@localhost ~]$ bash --version
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)
...

[yz@localhost ~]$ set -euo pipefail

[yz@localhost ~]$ echo $LD_LIBRARY_PATH
-bash: LD_LIBRARY_PATH: unbound variable
[yz@localhost ~]$ export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
[yz@localhost ~]$ echo $LD_LIBRARY_PATH
/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH

[yz@localhost ~]$ LD_LIBRARY_PATH=/usr/local/lib64/
[yz@localhost ~]$ echo $LD_LIBRARY_PATH
/usr/local/lib64/
[yz@localhost ~]$ export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
[yz@localhost ~]$ echo $LD_LIBRARY_PATH
/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH

Copy link
Contributor

@leborchuk leborchuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be fixed.

I think parameter with default value syntax should work only in bash https://linux.die.net/man/1/bash

${parameter:-word}
Use Default Values. If parameter is unset or null, the expansion of word is substituted. Otherwise, the value of parameter is substituted.

And we use bash in all our scripts, all should be Ok

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants